package ar.com.ford.it.fullEconomics.view.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import ar.com.ford.it.fullEconomics.security.FullEconomicsSessionControllerWslx;
import ar.com.ford.it.webengine.websession.WebSessionHelper;

public class InterfaceLoader extends Action {

	 public ActionForward execute(ActionMapping mapping, ActionForm form,
	            HttpServletRequest request, HttpServletResponse response)
	             
	 {
try {
	        System.out.println("Ejecutando interface loader action ...");
		 	FullEconomicsSessionControllerWslx sessionControler = new FullEconomicsSessionControllerWslx();
	        String userId = "p_feefmc";//request.getUserPrincipal().getName();//sessionControler.getUserId(request);
	        System.out.println(userId);
	        WebSessionHelper helper = new WebSessionHelper();
	        helper.registerSession(request, userId);
	        
	    
	 } catch(Exception e) {e.printStackTrace();
		 System.out.println("Fallo la ejecucion de Interface Loader");
	 }
	 return mapping.findForward("success");
	 }
}
